<template>
  <div class="hello">
    <h1>   一起学习   axios</h1>

  </div>
</template>

<script>
import axios from 'axios';
var HTTP = axios.create({
  baseURL:'http://106.12.14.210:7300/mock/5b6eedb05f7323fd536a9ebb/example/',
  timeout:1000,
  headers:{
    'custome-header':'miaov'
  },
  responseType:'json',
  params:{
    book:'123'
  }

});
export default {

  created(){
    HTTP.get("test-axios")
      .then(res=>{
        console.log(res.data)
      }).catch(err=>{
        console.log(err)
    })
  }

}
</script>






<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
